Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

actual filename and filename attribute #182

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

van-de-bugger
Copy link
Contributor

@van-de-bugger van-de-bugger commented Oct 22, 2015

PPI::Document constructor creates an object either from string or from file. However, even if object was created from a file, created object does not know name of the file it was created from. It makes error reporting difficult.

Code changed to let constructor save filename for latter use. BTW, filename constructor attribute introduced. It allows to specify filename even if an object is creating from a string. It may be useful if caller code reads file and creates PPI document from a string.

Test added. All the tests (including the new one) pass on my system.

See also: #180

from file. However, even if object was created from a file, created
object does not know name of the file it was created from. It makes
error reporting difficult.

Code changed to let constructor save filename for latter use. BTW,
filename attribute introduced. It allows to specify filename even
if an object was created from a string. It may be useful if caller
code reads file and creates PPI document from a string.

See also: Perl-Critic#180
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant